package yja.gzw.app.activity

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentPagerAdapter
import yja.gzw.app.R
import yja.gzw.app.base.BaseActivity
import yja.gzw.app.databinding.ActivityWodefankuiBinding
import yja.gzw.app.fragmentview.FankuierFragment
import yja.gzw.app.fragmentview.FankuiyiFragment
import yja.gzw.app.viewmodel.Mainviewmodel

class WodefankuiActivity :BaseActivity<Mainviewmodel, ActivityWodefankuiBinding>(R.layout.activity_wodefankui){

   val listfragment= mutableListOf<Fragment>(
        FankuiyiFragment(),FankuierFragment())
    val list_title= mutableListOf<String>("功能异常","产品建议")

    override fun initView() {
        binding.fanhui.setOnClickListener {
            finish()
        }
        binding.viewpager.adapter=object : FragmentPagerAdapter(supportFragmentManager){
            override fun getCount(): Int {

                return listfragment.size

            }

            override fun getItem(position: Int): Fragment {

                return listfragment[position]

            }

            override fun getPageTitle(position: Int): CharSequence {
                return list_title[position]
            }

        }

        binding.tabss.setupWithViewPager(binding.viewpager)



    }

    override fun dataObservese() {

    }


}